#include "qqmusic.h"

#include <QApplication>
#include <QSharedMemory>
#include <QMessageBox>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    //创建系统共享内存 , 单例启动qqMusic
    QSharedMemory sharedMemory("QQMusic");
    if(sharedMemory.attach())
    {
        QMessageBox::information(nullptr,"QQMusic提示","QQMusic已经在运行中....");
        return 0;
    }
    sharedMemory.create(1);

    QQMusic w;
    w.show();
    return a.exec();
}
